using Gateway.Infrastructure.AutoDI;

namespace Gateway.IQuery.Sign;

/// <summary>
/// 权限相关服务
/// </summary>
public interface IAuthService : IDependency
{
    /// <summary>
    /// 重置并查询自己的api 权限
    /// </summary>
    /// <returns></returns>
    Task<List<string>> ResetApisWithOwner(string userId = default, List<string> roleIds = default);


    /// <summary>
    /// 重置并查询自己的操作 权限
    /// </summary>
    /// <returns></returns>
    Task<List<string>> ResetPermissionWithOwner();


    bool CachePermissionWithOwner(List<string> data, string userId);
    bool CacheApisWithOwner(List<string> data, string userId);
}